package cz.semjob.document.annotation.metadata;


public class Relation extends AAnnotationType{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1592929861665604691L;
	
	private String type;
	
	public static Relation getNoneRelation(String type) {
		return AnnotationTypeFactory.getNoneRelation(type);
	}
	
	public Relation() {
		super();
	}
	
	public Relation(String name, String type) {
		super(name);
		this.type = type;
	}
	
	public Relation(String name) {
		super(name);
	}

	@Override
	public String toString() {
		return "Relation [type=" + type + ", name=" + name + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		Relation other = (Relation) obj;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		return true;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	
	
	
	
	
}
